/**
 * Created by YESO on 2015/12/7.
 */
angular.module('mealplan.filter', [])
//支付状态̬fitter
    .filter('pay_type', [function () {
        return function (input) {
            if (input == 0)
                return "未支付";
            if (input == 1)
                return "已支付";
            if (input == 2)
                return "已退款";
        }
    }])

    .filter('order_type', [function () {
        return function (input) {
            if (input == 0)
                return "普通订单";
            if (input == 1)
                return "团购";
            if (input == 2)
                return "秒杀";
            if (input == 3)
                return "促销";
            if (input == 4)
                return "货到付款";
        }
    }])
    .filter('discount_type', [function () {
        return function (input) {
            if (input == 0)
                return "不参加";
            if (input == 1)
                return "参加";
        }
    }])
    .filter('order_status', [function () {
        return function (input) {
            if (input == 0)
                return "卖家待发货";
            if (input == 1)
                return "卖家已发货";
            if (input == 2)
                return "卖家已收货";
            if (input == 3)
                return "完成订单且评价";
            if (input == 4)
                return "取消订单";
        }
    }])
    .filter('order_paytype', [function () {
        return function (input, arg1, arg2) {
            if (arg1 == 100)
                return "微信H5支付";
            if (arg1 == 101)
                return "支付宝H5支付";
            if (arg1 == 102)
                return "余额支付";
            if (arg1 == 103)
                return "微信APP支付";
            if (arg1 == 104)
                return "支付宝APP支付";
            if (arg1 == null && arg2 == 4)
                return "线下付款";
            if (arg1 == null && arg2 != 4)
                return "未支付";
        }
    }])
;
